discrete math functions example